﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="load_Hiragana.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Alphabets.load_Hiragana" %>

<<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<body>
    <%
        for (int i = 1; i <= this.hiragana_vertical_max; i++)
        {
    %>
    <div class="hiragana-row w3-row">
        <%
            int count = 0;
            for (int z = 1; z <= 5; z++)
            {

                var get_hiragana_her = new TblAlphabetController().FetchAll().Where(x => x.AlphaType == 1 && x.AlphaVertical == i && x.AlphaHerizontal == z);
                if (get_hiragana_her.ToList().Count != 0)
                {
                    count++;
        %>
        <div onclick="apb_select('<%=i %>','<%=get_hiragana_her.Single().AlphaHerizontal %>')" class="apb-box w3-col l2">
            <div onclick="edit_apb_item(this)" class="apb-item w3-hover-light-grey" title="Chi tiết">
                <span class="apb-jp"><%=get_hiragana_her.Single().AlphaName %></span><br />
                <span class="apb-vn"><%=get_hiragana_her.Single().AlphaTrans %></span>
                <span class="apb-img-src w3-hide"><%=get_hiragana_her.Single().AlphaPic %></span>
                <span class="apb-audio-src w3-hide"><%=get_hiragana_her.Single().AlphaSnd %></span>
            </div>
        </div>
        <%}
            else
            { %>
        <div onclick="apb_select('<%=i %>','<%=z %>')" class="apb-box w3-col l2">
            <div onclick="add_apb_item(this)" class="add-apb-item-btn w3-hover-light-grey w3-center" title="Thêm chữ cái">
                <i class="fa fa-plus w3-text-teal"></i>
            </div>
        </div>
        <%}
            }%>
        <%if (count != 0)
            { %>
        <div class="apb-box w3-col l1">
            <div class="apb-speak-five-btn w3-hover-light-grey w3-hover-text-teal" title="Nghe bộ phát âm">
                <label class="w3-hide snd_vertical"><%=i %></label>
                <i class="fa fa-volume-up"></i>
                <br />
                <i class="fa fa-long-arrow-right"></i>
            </div>
        </div>
        <%}
            else
            {%>
        <div class="apb-box w3-col l1">
            <div class="apb-not-speak-five-btn" title="Chưa có chữ cái nào để nghe">
                <i class="fa fa-volume-up"></i>
                <br />
                <i class="fa fa-long-arrow-right"></i>
            </div>
        </div>
        <%} %>
        <div class="apb-box w3-col l1">
            <div onclick="delete_apb_five()" class="apb-delete-five-btn w3-hover-light-grey w3-hover-text-teal" title="Xoá bộ phát âm">
                <i class="fa fa-trash"></i>
            </div>
        </div>
    </div>
    <% } %>

    <div class="add-apb-speak-five w3-row">
        <div onclick="add_apb_select('1')" class="apb-box w3-col add-apb-herizontal l2">
            <div onclick="add_apb_item(this)" class="add-apb-item-btn w3-hover-light-grey w3-center" title="Thêm chữ cái">
                <i class="fa fa-plus w3-text-teal"></i>
            </div>
        </div>
        <div onclick="add_apb_select('2')" class="apb-box w3-col add-apb-herizontal l2">
            <div onclick="add_apb_item(this)" class="add-apb-item-btn w3-hover-light-grey w3-center" title="Thêm chữ cái">
                <i class="fa fa-plus w3-text-teal"></i>
            </div>
        </div>
        <div onclick="add_apb_select('3')" class="apb-box w3-col add-apb-herizontal l2">
            <div onclick="add_apb_item(this)" class="add-apb-item-btn w3-hover-light-grey w3-center" title="Thêm chữ cái">
                <i class="fa fa-plus w3-text-teal"></i>
            </div>
        </div>
        <div onclick="add_apb_select('4')" class="apb-box w3-col l2">
            <div onclick="add_apb_item(this)" class="add-apb-item-btn w3-hover-light-grey w3-center" title="Thêm chữ cái">
                <i class="fa fa-plus w3-text-teal"></i>
            </div>
        </div>
        <div onclick="add_apb_select('5')" class="apb-box w3-col l2">
            <div onclick="add_apb_item(this)" class="add-apb-item-btn w3-hover-light-grey w3-center" title="Thêm chữ cái">
                <i class="fa fa-plus w3-text-teal"></i>
            </div>
        </div>
        <div class="apb-box w3-col l1">
            <div class="apb-not-speak-five-btn" title="Chưa có chữ cái nào để nghe">
                <i class="fa fa-volume-up"></i>
                <br />
                <i class="fa fa-long-arrow-right"></i>
            </div>
        </div>
        <div class="apb-box w3-col l1">
            <div onclick="cancel_add_speak_five(this)" class="apb-cancel-five-btn w3-hover-light-grey w3-hover-text-teal" title="Huỷ bộ phát âm">
                <i class="fa fa-times"></i>
            </div>
        </div>
    </div>
    <div class="w3-padding w3-center">
        <a onclick="add_speak_five(this)" class="add-apb-speak-five-btn w3-btn w3-teal"><i class="fa fa-download"></i>&nbsp;Tạo bộ phát âm</a>
    </div>
</body>
</html>
